#!/usr/bin/env python
# -*- coding: utf-8 -*-

from str_analyzer import StrAnalyzer
import time

__author__ = 'gogo'


start_time = time.time()

sa = StrAnalyzer()

queries = [
    'in the aspirin',
    'aspirin',
    'for the paracetamol',
    'sopharma paracetamol  ',
    'Nebivolol erethism',
    'Panadol',
    'panadol suspension',
    'paracetamol 500',
    'taLcid?',
    'TALCID TABLETS',
    'talcid chewable'
    'AIDS',
    'ebola',
    'ZIKA',
    'erethism',
    'leukoderma',
    'monodactylism',
    'abiotrophia',
    'ahrensia',
    'kribbella',
    'micromonospora',
    'oxalicibacterium',
    'acanthocyte',
    'blastocyte',
    'hepatocyte',
    'macropromyelocyte',
    'siderocyte',
    'spermatocyte',
    'thrombocyte',
    'vercyte',
    'Nebivolol aspirin',
    'APHASIOLOGY, ASPIRIN',
    'thrombocyte, oranges',
    ', oranges,thrombocyte',
    'aspirin tablets',
    'complex,aspirin',
    'marfan',
    'panadol-extra',
    'panadol',
    'nurofen',
    'nurofen for kids',
    'nurofen for children',
    'nurofen suspension',
    'nurofen express',
    'nurofen extra',
    'nurofen forte',
    'ibuprofen',
    'analgin',
    'analgin injection',
    'analgin tablets',
    'aspirin for headache',
    'headache',
    'biseptol 200',
    'peritol',
    'fentanil',
    'fentanil,aspirin',
    'codeine, AIDS',
    'vitamin B12'
]

for q in queries:
    #if isinstance(sa.detect_object(q), list):
    #    print 'More Results'
    #elif isinstance(sa.detect_object(q), tuple):
    #    print 'One result'
    #elif sa.detect_object(q) is None:
    #    print 'Not result'
    print q, type(sa.detect_object(q)), '-> \n', sa.detect_object(q)

    print 80 * '-'

end_time = time.time()
print end_time -start_time
